#include<iostream>

#include<unistd.h>

#define NUM 51


int main()
{
  char s[NUM];
  int count = 0;
  std::string C("|/-\\");
  while(count <  NUM){
    
    printf("[%-50s][%-4d%%][%c]\r",s,count*2,C[count%4]);

    fflush(stdout);
    s[count++] = '=';
    s[count+1] = '\0';
    usleep(100000);
  }
    std::cout<<std::endl;
  return 0;
}
